package cn.echo42.controller;

import cn.echo42.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author DaiZhiZhou
 * @file SSM-NoMavenVersion
 * @create 2020-07-18 22:35
 */

@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/user-list")
    public String userListPage(Model model) {
        model.addAttribute("userList", userService.getUserList());
        return "user-list";
    }
}
